package com.yd.app.service.pc.jewellery.jewelleryPageService;

import com.yd.app.mapper.EvaluateMapper;
import com.yd.domain.business.Evaluate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by sunxianhui on 2018/5/16.
 */
@Service
public class WebEvaluateService {
    @Autowired
    EvaluateMapper evaluateMapper;

    /**
     * 查找
     * @param orderId
     * @param goodsId
     */
    public Evaluate getEvaluate(String orderId, String goodsId) {
        Evaluate evaluate= evaluateMapper.getEvaluate(orderId,goodsId);
        return evaluate;
    }

    /**
     * 添加评价
     *
     * @param evaluate
     */
    public int addEvaluate(Evaluate evaluate) {
        return evaluateMapper.addEvaluate(evaluate);
    }

    /**
     * @Author: zy
     * @Desc: 删除
     * @Date:  2018/4/27
     * @Param
     */
    public void deleteEvaluate(String orderId, String goodsId) {
        evaluateMapper.deleteEvaluate(orderId,goodsId);
    }
}
